import sys

# str = sys.stdin.readline()
# print(str)
#
# num= input("请输入一个数字")
# print(num)
#
# sys.stdout.write("hello ")
# print('world')


# file = open('a.txt','r',buffering=1)
# # read,一次读取所有内容
# print(file.read())
# file.close()

# with open('a.txt','r',encoding='utf-8', buffering=1) as file2:
#     # print(file2.readline())
#     # print(file2.readline())   一次一行
#
#     # 一次多行，返回一个列表对象
#     print(file2.readlines())

# r:读   w:写，覆盖    a:追加写入，不覆盖
with open('a.txt','w',encoding='utf-8', buffering=1) as file3:
    file3.write('hello world')